-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uefi: Add safe protocol wrapper for EFI_ATA_PASS_THRU_PROTOCOL #1595
base: main
Are you sure you want to change the base?
Conversation
5d20e04
to
17ff660
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! Left a few remarks
2ccfb33
to
6a82a32
Compare
4e64767
to
9a64ab4
Compare
8ab0d94
to
1e5d815
Compare
xtask/src/qemu.rs
Outdated
@@ -489,6 +489,18 @@ pub fn run_qemu(arch: UefiArch, opt: &QemuOpt) -> Result<()> { | |||
cmd.arg("-device"); // attach disk to SCSI controller | |||
cmd.arg("scsi-hd,drive=scsidisk0,vendor=uefi-rs,product=ExtScsiPassThru"); | |||
|
|||
if arch == UefiArch::IA32 || arch == UefiArch::X86_64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens on AARCH64? Does QEMU only support the ATA controller on x86?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting it to work is difficult because the default hardware configuration between x86 and arm is quite different. And since (at least afaik) I can't run it locally, I would need to push 1000 times to get it working. I'll try again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qemu seems to support having a SATA controller with aarch64
.
But the UEFI firmware does not produce an AtaPassThru
instance for the controller. So it seems that EDK2 is at fault. I'll document it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're almost there!
530521a
to
dd50f86
Compare
Update Latest API discussions
Implemented a safe API wrapper for
EFI_ATA_PASS_THRU_PROTOCOL
[1d3de7f0-0807-424f-aa69-11a54e19a46f
].Added an integration-test for it.
This contains a copy of the AlignedBuffer commit from #1589.
This uses the iterator/mutable design I suggested here: #1589 (comment) where the iter method only captures the protocol (
AtaPassThru
) immutably, but requires you to use the produced element (AtaDevice
) in a mutable way for meaningful methods like execute_command.This closes #244
Checklist